﻿@model IEnumerable<Domain.Entity.NewsArticle>

@{
    ViewBag.Title = "News";
}

<p>
    @Html.ActionLink("Create New", "Create", null, new { @class = "actionButtons " + @Html.GetColor(Request.Cookies["color"]) })
</p>
<table class="defaultGrey">
    <tr class="tHeader @Html.GetColor(Request.Cookies["color"])">
        <th>
            PostedDate
        </th>
        <th>
            Title
        </th>
        <th>
            Abstract
        </th>
        <th colspan="3"></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.PostedDate)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Abstract)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Id }, new { @class = "actionButtons " + @Html.GetColor(Request.Cookies["color"]) })
        </td>
        <td>    
            @Html.ActionLink("Delete", "Delete", new { id = item.Id }, new { @class = "actionButtons " + @Html.GetColor(Request.Cookies["color"]) })
        </td>
        <td>
            @Html.ActionLink("Details", "Details", new { id = item.Id }, new { @class = "actionButtons " + @Html.GetColor(Request.Cookies["color"]) })
        </td>
    </tr>
}

</table>
